﻿<UserControl x:Class="DSLPedItemWizard.Views.SelectionWizardView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             Width="450"
             Height="250"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>

        <Label Padding="10,5,0,0" Grid.Row="0">Select domain-specific language:</Label>
        <Border Margin="10,5,10,5" BorderThickness="1" BorderBrush="Black" Grid.Row="1">
            <ListView ItemsSource="{Binding Path=AddIns}"
                    SelectedItem ="{Binding Path=SelectedAddIn}"
                    Grid.Row="0"
                    Grid.ColumnSpan="2"
                    BorderThickness="0">
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <Label Content="{Binding Metadata.Name}" Padding="2,0,0,0"></Label>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
        </Border>

        <StackPanel Grid.Row="2">
            <Label Padding="10,5,0,0">Detail:</Label>
            <Border Margin="10,5,10,5" BorderThickness="1" BorderBrush="Black">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Border Grid.Column="0">
                        <Image Source="{Binding Path=Image, Mode=OneWay}" Width="20" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,10,10,10"/>
                    </Border>
                    <TextBox Grid.Column="1" Height="80" Margin="0,0,0,1" Text="{Binding Path=Detail, Mode=OneWay}" IsReadOnly="True" TextWrapping="Wrap"
                             BorderThickness="0"/>
                </Grid>
            </Border>
        </StackPanel>
    </Grid>
</UserControl>
